import 'package:flutter/material.dart';
import 'package:flutter_project/core/storage.dart';
import 'package:flutter_project/custom/appbar/asu_appbar.dart';
import 'package:flutter_screenutil/flutter_screenutil.dart';

class HomePage extends StatefulWidget {
  @override
  _HomePageState createState() => _HomePageState();
}

class _HomePageState extends State<HomePage> {
  @override
  Widget build(BuildContext context) {
    return Scaffold(
        resizeToAvoidBottomInset: false,
        appBar: AsuAppbar(title: '主页', back: false),
        body: Center(
          child: Column(
            children: <Widget>[
              Container(
                padding: EdgeInsets.only(top: 100.h),
                child: Text("主页"),
              ),
              RaisedButton(
                child: Text("退出登录"),
                onPressed: () {
                  Storage.clearAuthData();
                  Navigator.pushReplacementNamed(context, '/login');
                },
              )
            ],
          ),
        )
    );
  }
}
